
#ifndef WIDGETPANEL_H
#define WIDGETPANEL_H

#include <BLineEdit>
#include <BSpinBox>
#include <BGroupBox>
#include <BCheckBox>
#include <BComboBox>

using namespace BWE;

class WidgetPanel : public BGroupBox
{
public:
	WidgetPanel(BWidget* parent = 0);

protected:
	Policy policyFromMenu(BMenu* menu, BString& text);
	void policyToMenu(Policy policy, BMenu* menu, BString& text);

protected:
	void slotAssetChanged();
	void slotTipsEdited(BObject* object, const BValue& value);
	void slotWidthPolicyMenuChecked(BObject* object, const BValue& value);
	void slotHeightPolicyMenuChecked(BObject* object, const BValue& value);

private:
	BWidget*	_widget;

	BLineEdit*			_nameEdit;
	BLineEdit*			_titleEdit;
	BCheckBox*		_framelessCheckBox;
	BLineEdit*			_tipsEdit;
	BSpinBox*		_fixedWidthSpinBox;
	BSpinBox*		_fixedHeightSpinBox;
	BSpinBox*		_minWidthSpinBox;
	BSpinBox*		_minHeightSpinBox;
	BSpinBox*		_maxWidthSpinBox;
	BSpinBox*		_maxHeightSpinBox;
	BButton*		_widthPolicyButton;
	BButton*		_heightPolicyButton;
};

#endif
